% Script for the postprocessing of dGEMRIC series
% Place the cursor and use Cntr+Enter to run a cell between the %% signs
% Henk Smit, EMC 09/2011 h.smit@erasmusmc.nl

%% Set the parent directory
clear all
basedir = 'C:\Users\Henk Smit\Desktop\MRData\120322dGemricQmap';
protocols = 2;

%% Draw the cartilage masks on the different protocols
% Select the dicoms for drawing in this order: SPGR, QMAP_ARC, QMAP, HiRes 
  
dGemricdrawfitmasks(protocols, basedir, false);

%% Set arguments for registration, estimation and graphs

serie = 1; %fill in which serie(1-20)
slice = 1; % fill in which mask (1-2)
sigma = 36; % fill in noiselevel

%% Perform Registration 
% First set the right serie and slice

for(i=1:3)
    dGemricIRregister(basedir,i)
end

% for(i=1:2)
%  dGemricQmapRegister(basedir,serie,i)
% end

%% Estimate the T1 maps
% First set the right serie and slice
for i=2:3   
    for(j=1:1)
        dGemricT1fit(i,j,sigma,basedir);
    end
end

%% Plot Graphs
% Under construction

% dGemricGraphs(basedir,serie,slice);


